home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / texsis / Unix / TEXSIS01 / vms_bundle < prev    next >
Encoding:
Text File  |  1992-08-02  |  825 b   |  39 lines

  1. #!/bin/sh
  2. # Shell script to bundle groups of files for VMS systems.  
  3. # Uses the MANIFEST file created by the makekit program to determine the 
  4. # contents of each bundle, so you must make Unix bundles first.
  5.  
  6. i=1
  7. while true
  8. do
  9.     a=`fgrep " $i    " MANIFEST | awk '{ print $1 }' `
  10.     if [ -z "$a" ]
  11.     then
  12.         exit 0
  13.     fi
  14.     echo Making kit $i
  15.     if [ $i -lt 10 ]
  16.     then
  17.         outf=TEXSIS"0$i".COM
  18.     else
  19.         outf=TEXSIS${i}.COM
  20.     fi
  21.     echo \
  22. "\$! === THIS IS AN ARCHIVE FILE -- DELETE EVERYTHING ABOVE THIS LINE ===" \
  23. > $outf
  24.     echo "\$! === THEN EXECUTE THIS FILE WITH \"@$outf\" ===" >> $outf
  25.     echo "\$! Contents:" >> $outf
  26.     for f in $a
  27.     do
  28.         echo "\$!    $f" >> $outf
  29.     done
  30.     for f in $a
  31.     do
  32.         echo "\$! =========== $f ============" >> $outf
  33.         echo "\$ copy sys\$input $f" >> $outf
  34.         sed -e '/^\$/s/^\$/ \$/' $f >> $outf
  35.     done
  36.     i=`expr $i + 1`
  37. done
  38.  
  39.